import request from '@/utils/request'

// 查询排班列表
export function listSchedulingDaily(query) {
  return request({
    url: '/dispatch/schedulingDaily/list',
    method: 'get',
    params: query
  })
}

// 查询排班详细
export function getSchedulingDaily(id) {
  return request({
    url: '/dispatch/schedulingDaily/' + id,
    method: 'get'
  })
}

// 新增排班
export function addSchedulingDaily(data) {
  return request({
    url: '/dispatch/schedulingDaily',
    method: 'post',
    data: data
  })
}

// 修改排班
export function updateSchedulingDaily(data) {
  return request({
    url: '/dispatch/schedulingDaily',
    method: 'put',
    data: data
  })
}

// 删除排班
export function delSchedulingDaily(id) {
  return request({
    url: '/dispatch/schedulingDaily/' + id,
    method: 'delete'
  })
}

export function getPlanListByDay(date) {
  return request({
    url: `/dispatch/schedulingDaily/getPlanListByDay?useDay=${date}`,
    method: 'get'
  })
}